import java.util.Scanner;


	public class n3 {
	    private static Scanner scn;

	    public static void main(String[] args) {
	            int n = 0;
	            scn = new Scanner(System.in);
	            System.out.print("Vvedite dlinu massiva ");
	            n = scn.nextInt();
	            int[] a = new int[n];
	            for (int i = 0; i < n; i++) {
	                    a[i]= i+1;      
	                    System.out.print(a[i] + " ");
	            }
	            System.out.println("Srednee arifmeticheskoe " + avg(n, a));
	    }

	    private static double avg(int n, int[] i) {
	            double m = 0;
	            for (int j = 0; j < n; j++) {
	                    m = m + i[j];                   
	            }
	            double sr = m/n;
	            return sr;
	    }

}
